package com.xiaolin.designmode.state;

/**
 * @ClassName Context
 * @Description 环境角色
 * @Detail detail
 * @Author MyPC
 * @Date 2020/11/6
 * @Version 1.0
 */
public class Context {
    //状态类
    private State state;
    public Context(){
        this.state=new ConcreteStateA();
    }
    public void setState(State state) {
        this.state = state;
    }

    public State getState() {
        return state;
    }
    public void handle(){
        this.state.handle(this);
    }
}
